
$(function(){
    $("#addProblem").validate({
        rules: {
            "mainProblem": {
                required: true
            }, "problemName": {
                required: true
            },"type": {
                required: true
            },"must": {
                required: true
            },"1": {
                required: true
            },
            "2": {
                required: true
            },
            "3": {
                required: true
            },
            "4": {
                required: true
            },
            "5": {
                required: true
            },
            "6": {
                required: true
            },
            "7": {
                required: true
            },
            "8": {
                required: true
            },
            "9": {
                required: true
            },
            "10": {
                required: true
            },
        },
        onkeyup:false,
        focusCleanup:true,
        success:"valid",
        submitHandler:function(form){
            $(form).ajaxSubmit({
                success: function(data) {
                    if(data.ok){
                        msg('保存成功',1000,function(){
                            parent.location.replace(parent.location.href);
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(index);
                        });
                    }else{
                        msg(data.msg);
                    }
                },
                error:function(){
                    msg('保存失败，服务器异常');
                }
            });
        }
    });
});

$(function(){
    $(".noclass").click(function(){
        $(".removeClass").attr("style","display:none;");//隐藏div
    });
    $(".disClass").click(function () {
        $(".removeClass").attr("style","display:block")
    })

});